package com.example.administrator.tiyuapp.NewsFragment.beans;

import android.util.Log;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * Created by Administrator on 2017/1/17.
 * 保存新闻的标题
 */
public class Channels {
//    "id":0,
//            "name":"推荐",
//            "logo":"hot",
//            "num":0,
//            "sort":50,
//            "create_time":"Thu Nov 27 16:16:05 +0800 2014"
    private  String name;
    private String logo;
//    public Channels(String name) {
//        this.name = name;
//    }

    public void  parseJSon(JSONObject jsonObject){
        try {
            name=jsonObject.getString("name");
            logo=jsonObject.getString("logo");
        } catch (JSONException e) {
            e.printStackTrace();
            Log.i("haha","标题解析异常");
        }

    }


    public void setName(String name) {
        this.name = name;
    }

    public void setLogo(String logo) {
        this.logo = logo;
    }

    public String getName() {
        return name;
    }

    public String getLogo() {
        return logo;
    }
}
